package com.whxd.smarthome.api.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whxd.smarthome.api.entity.Version;
import com.whxd.smarthome.api.repository.VersionDao;

@Service
public class VersionServiceImpl implements VersionService {

	@Autowired
	private VersionDao authorityDao;

	@Override
	public Version findByClient(String client) {
		return authorityDao.findByClient(client);
	}

	@Override
	public Version findAndroidVersion() {
		return authorityDao.findByClient(Version.CLIENT_ANDROID);
	}

	@Override
	public Version findIOSVersion() {
		return authorityDao.findByClient(Version.CLIENT_IOS);
	}

}
